<?php
/**
 * User: zhangligang
 * Email: tzhang2450@163.com
 * Date: 2018/12/20
 * Time: 17:08
 */

namespace App\Http\Controllers;

class ManagerController extends Controller
{
    public function index()
    {
        return $this->baseView('public.manager.index', []);
    }

    public function data()
    {
        return $this->baseView('public.manager.data', ['menu' => 'data']);
    }

    public function edit()
    {
        return $this->baseView('public.manager.edit', []);
    }

    public function contest()
    {
        return $this->baseView('public.manager.contest', ['menu' => 'contest']);
    }

    public function contestCreate()
    {
        return $this->baseView('public.manager.contest-create', ['menu' => 'contest']);
    }

    public function contestEdit($id)
    {
        return $this->baseView('public.manager.contest-edit', ['menu' => 'contest', 'id' => $id]);
    }

    public function file()
    {
        $now = date('Y', time());
        return $this->baseView('public.manager.file', ['menu' => 'file', 'year' => $this->year, 'now' => $now]);
    }

    public function fileCreate()
    {
        return $this->baseView('public.manager.file-create', ['menu' => 'file']);
    }

    public function fileEdit($id)
    {
        return $this->baseView('public.manager.file-edit', ['menu' => 'file', 'id' => $id]);
    }

    public function userFileDetail($id)
    {
        $now = date('Y', time());
        return $this->baseView('public.manager.user-file-detail', ['menu' => 'user', 'id' => $id, 'year' => $this->year, 'now' => $now]);
    }

    public function departmentFileDetail($id)
    {
        $now = date('Y', time());
        return $this->baseView('public.manager.department-file-detail', ['menu' => 'department', 'id' => $id, 'year' => $this->year, 'now' => $now]);
    }

    public function grow()
    {
        return $this->baseView('public.manager.grow', ['menu' => 'grow']);
    }

    public function growCreate()
    {
        return $this->baseView('public.manager.grow-create', ['menu' => 'grow']);
    }

    public function growEdit($id)
    {
        return $this->baseView('public.manager.grow-edit', ['menu' => 'grow', 'id' => $id]);
    }

    public function increase()
    {
        return $this->baseView('public.manager.increase', ['menu' => 'increase']);
    }

    public function userIncreaseDetail($id)
    {
        return $this->baseView('public.manager.user-increase-detail', ['menu' => 'user', 'id' => $id]);
    }

    public function departmentIncreaseDetail($id)
    {
        return $this->baseView('public.manager.department-increase-detail', ['menu' => 'department', 'id' => $id]);
    }

    public function user()
    {
        return $this->baseView('public.manager.user', ['menu' => 'user']);
    }

    public function userDetail($id)
    {
        $now = date('Y', time());
        return $this->baseView('public.manager.user-detail', ['menu' => 'user', 'id' => $id, 'year' => $this->year, 'now' => $now]);
    }

    public function department()
    {
        return $this->baseView('public.manager.department', ['menu' => 'department']);
    }

    public function departmentDetail($id)
    {
        $now = date('Y', time());
        return $this->baseView('public.manager.department-detail', ['menu' => 'department', 'id' => $id, 'year' => $this->year, 'now' => $now]);
    }

    public function rule()
    {
        return $this->baseView('public.manager.rule', ['menu' => 'rule']);
    }

    public function ruleCreate()
    {
        return $this->baseView('public.manager.rule-create', ['menu' => 'rule']);
    }

    public function ruleEdit($id)
    {
        return $this->baseView('public.manager.rule-edit', ['menu' => 'rule', 'id' => $id]);
    }

    public function gradeDepartmentIncrease($id, $departmentId)
    {
        return $this->baseView('public.manager.grade-department-increase', ['menu' => 'department', 'id' => $id, 'departmentId' => $departmentId]);
    }
}